#pragma once

#include <memory>
#include "instructions/base/instructions.h"
#include "rtda/frame.h"

namespace jvm {
namespace instructions {

// Reference comparisons
class IF_ACMPEQ : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IF_ACMPNE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};

// Integer comparisons
class IF_ICMPEQ : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IF_ICMPNE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IF_ICMPLT : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IF_ICMPLE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IF_ICMPGT : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IF_ICMPGE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};

// Integer-zero comparisons
class IFEQ : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IFNE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IFLT : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IFLE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IFGT : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class IFGE : public BranchInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};

// Numeric comparisons
class LCMP : public NoOperandsInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class DCMPG : public NoOperandsInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class DCMPL : public NoOperandsInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class FCMPG : public NoOperandsInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};
class FCMPL : public NoOperandsInstruction {
public: void execute(std::shared_ptr<rtda::Frame> frame) override;
};

} // namespace instructions
} // namespace jvm